#ifndef _GAME_MANAGER_H_
#define _GAME_MANAGER_H_

#include <ncurses.h>
#include <vector>
#include "game.h"
#include "doubles.h"
#include "pve_game.h"

class GameManager
{
public:
    GameManager();
    ~GameManager();
    
    void createWelcomeWindows();
    void renderWelcomeWindows() const;
    void renderControlPanel() const;
    void renderInstructionPanel() const;
    int renderWelcomeMenu() const;
    void startWelcomeScreen();
    void deleteInstructionPanel() const;
    
    // 皮肤选择相关方法
    int renderSkinSelectionMenu() const;
    void renderSkinPreview(int skinIndex) const;
    void showFullSkinPreview(int skinIndex) const;
    void openTxtWindow(int skinIndex) const;
    void loadSkinData();
    int getCurrentSkin() const { return mCurrentSkin; }
    const std::vector<std::string>& getSkinData(int skinIndex) const;
    
    // 鏖战询问相关方法
    bool askForFinalFight() const;
    
private:
    std::vector<WINDOW*> mWelcomeWindows;
    int mScreenWidth;
    int mScreenHeight;
    int mControlPanelWidth;
    int mInstructionPanelWidth;
    
    // 皮肤数据
    std::vector<std::vector<std::string>> mSkinData;
    std::vector<std::string> mSkinNames;
    int mCurrentSkin = 0;
};

#endif